//
//  CommentList.m
//  ArtDog
//
//  Created by dllo on 16/9/6.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "CommentList.h"
#import "CommunityPicture.h"
@implementation CommentList

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"id"]) {
        _idField = value;
    }
}

- (void)setValue:(id)value forKey:(NSString *)key
{
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"pictures"]) {
        NSMutableArray<CommunityPicture *> *array = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            CommunityPicture *picture = [CommunityPicture modelWithDic:dic];
            [array addObject:picture];
        }
        _pictures = array;
    }
}

@end
